var EnemyFactory = {
	rat: {name: "Giant rat", hp: 30, str: 18, dfs: 14, spd: 13, luk: 15, exp: 15, spr: "rat" },
	bat: {name: "Bat", hp: 15, str: 14, dfs: 10, spd: 16, luk: 10, exp: 8, spr: "bat" },
	
	getEnemy: function(code){
		var ret = null;
		if (EnemyFactory[code]){
			var e = EnemyFactory[code];
			ret = {
				name: e.name,
				hp: e.hp,
				str: e.str,
				dfs: e.dfs,
				spd: e.spd,
				spr: e.spr,
				exp: e.exp
			};
		}
		
		return ret;
	}
};

var EnemySprites = {
	rat: {
		boundBox: [-35,20,100,120], 
		vertices: [20,130, 15,140, 45,140, 30,130, 50,105, 40,90, 40,70, 70,30, 50,80, 60,110, 30,130, 50,105, 40,90, 20,90, 20,110, 40,90, 20,60, 35,40, 30,20, 20,30, 0,20, -30,40, -10,70, -10,110, -25,90, -10,70, -25,90, -30,105, -10,130, -25,140, 5,140, 0,130, 20,130], 
		extra: [-20,33,-20,70, -20,70,-10,70, -5,42,10,42, 10,42,10,31, 10,31,-5,42, -25,90,-10,90, -22,42,-8,32, -22,44,-8,54]
	},
	
	bat: {
		boundBox: [-100,-60,200,60], 
		vertices: [0,0, 30,-30, 60,-10, 100,-60, 50,-80, 15,-65, 15,-80, 10,-75, -10,-75, -15,-80, -15,-65, -50,-80, -100,-60, -60,-10, -30,-30, 0,0], 
		extra: [-15,-65,-15,-30, -15,-30,0,-15, 0,-15,15,-30, 15,-30,15,-65, -7,-23,-23,-5, 7,-23,23,-5, -7,-65,-3,-55, 3,-55,7,-65]
	}
};
